﻿/// <reference path="../Core.ts" />

module Supernova {

    export class Missile {

        public sourceShip: Ship = null;
        public targetShip: Ship = null;
        public x: number = 0;
        public y: number = 0;
        public speed: number = 0;
        public acceleration: number = 0;

        constructor(sourceShip: Ship, targetShip: Ship) {
            this.sourceShip = sourceShip;
            this.targetShip = targetShip;
            this.x = sourceShip.currentLocation.x;
            this.y = sourceShip.currentLocation.y;
            this.speed = sourceShip.attackRadius * MISSILE_SPEED_INITIAL;
            this.acceleration = sourceShip.attackRadius * MISSILE_SPEED_INCREASE_RATE;
        }

    }

}